package pl.kosmowska.ewelina.client.app.activity;

import pl.kosmowska.ewelina.client.app.ClientFactory;
import pl.kosmowska.ewelina.client.views.impl.LeftSideViewImpl;

import com.google.gwt.activity.shared.AbstractActivity;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.place.shared.Place;
import com.google.gwt.user.client.ui.AcceptsOneWidget;

public class LeftSideActivity extends AbstractActivity  {

	private ClientFactory clientFactory;


	public LeftSideActivity(ClientFactory clientFactory) {
		this.clientFactory = clientFactory;
	}
	
	@Override
	public void start(AcceptsOneWidget panel, EventBus eventBus) {
	
		LeftSideViewImpl leftSide = clientFactory.getLeftSide();
		panel.setWidget(leftSide);
	}


	public void goTo(Place place) {
		clientFactory.getPlaceController().goTo(place);
	}

}
